// components/dragview/drag.js
Component({
  options:{
    addGlobalClass:"apply-shared"
  },
  /**
   * 组件的属性列表
   */
  lifetimes: {
    attached: function () {
      let that = this
      wx.getStorage({
        key: 'roomItem',
        success(res) {
          that.data.images = res.data.currentTarget.dataset.item.rommimgs
          console.log(res, that.data.images)
          that.setData({
            roomImgs: that.data.images
          })
        },
        fail(res) {
          console.log(res)
        }
      })
    }
  },
  /**
   * 组件的初始数据
   */
  data: {
    images: [],
    indicator: false,
    play: false,
    curindex: 0,
    cid:0
  },

  /**
   * 组件的方法列表
   */
  methods: {

    change(e) {
      console.log(e)
      this.setData({
        curindex:e.detail.current
      })
    },
    tabto(e) {
      console.log(e)
      this.setData({
        curindex: e.currentTarget.dataset.index
      })
    }

  }
})
